
<div id="body_container">
    <div class="detail_container">
      <div class="detail_box">
        <div class="detail_top_curve">
          <div class="detail_detail_content">
            <div class="welcomezone">
              <div style="margin-bottom:10px;">
                <div class="blueboldheading">
                  <h1>Meeting room</h1>
                </div>

<% if session[:user_id] %>

<script>
        $(document).ready(function() {
            $('#Button1').click(function() {
                $('#reload').fadeOut("slow").load('meetingroom.html.erb').fadeIn("slow");
            });
        });  
</script>

<h3>People currently online <input id="Button1" type="button" value=" Refresh " /></h3>
<div id="reload">
<% @users = User.all %>
<% @users.each do | t | %>
<% if t.online && t != User.find(session[:user_id]) %>

<div> <br />
            <h2><%= t.username%> </h2>
			<% match = Information.find(t.id) rescue nil %>
			
			<% if t.photo.file? %>
                  <%= image_tag t.photo(:small), :hspace=>15, :vspace=>15, :class=>"project-img" %>
			<% else %>
				<%= image_tag "d.png", :width => 150, :height => 150, :hspace=>15, :vspace=>15, :class=>"project-img" %>
			<% end %>
			<% if !match.nil? %>
                  <p>looking for a(n) <%= match.typeofrelation %> relationship.<br />
                    <%= (match.height.to_f/100.to_f) %> meters, <%= match.morphology %>, <%= match.hair %> hair and <%= match.eyes %> eyes.<br />
                  </p>
		<% else %>
		This user hasn't filled it informations yet.
		<% end %>
		</br>
		</br>
		
		<span class="know_more"><%= link_to 'Know more',"/profile/"+ t.id.to_s() %></span>
			</br>
			<span class="know_more">
			<%= link_to 'Write to '+t.username,"/private_message/new?param1="+t.username %></span>
		</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
<%end%>
<%end %>
</div>
<%else%>

<h2><%= link_to "Meet all our members by one click!", '/register' %></h2>
<%end%>
</center>
</br>
</br>
